import React from 'react'
import { Button, ConfigProvider } from "antd"
import { BrowserRouter, HashRouter, Routes, Route, Navigate } from "react-router-dom"
// import Login from "./views/Login"
// import Register from "./views/Register"
// import Home from "./views/Home"
// import NotFind from './views/NotFind'
// import User from './views/subs/system/User'
// import Role from './views/subs/system/Role'
// import Main from './views/subs/Main'
// import Shop from "./views/subs/system/Shop"
// import ProductList from "./views/subs/product/ProductList"
// import ProductCategory from "./views/subs/product/ProductCategory"
// import Salary from "./views/subs/chart/Salary"
// import Sale from "./views/subs/chart/Sale"
// import ProductAdd from './views/subs/product/ProductAdd'
// import ProductUpdate from './views/subs/product/ProductUpdate'
import DynamicRouter from './router/DynamicRouter'

function App() {
  return (
    <ConfigProvider
      theme={{
        token: {
          colorPrimary: '#7cb305'
        }
      }}>
      <BrowserRouter>
        <DynamicRouter></DynamicRouter>
        {/* <Routes>
          <Route path="/login" element={<Login></Login>}></Route>
          <Route path="/reg" element={<Register></Register>}></Route>
          <Route path="/home" element={<Home></Home>}>
            <Route index={true} element={<Main></Main>}></Route>
            <Route path="user" element={<User></User>}></Route>
            <Route path="role" element={<Role></Role>}></Route>
            <Route path="shop" element={<Shop></Shop>}></Route>
            <Route path="list" element={<ProductList></ProductList>}></Route>
            <Route path="category" element={<ProductCategory></ProductCategory>}></Route>
            <Route path="salary" element={<Salary></Salary>}></Route>
            <Route path="sale" element={<Sale></Sale>}></Route>
            <Route path="productadd" element={<ProductAdd></ProductAdd>}></Route>
            <Route path="productupdate" element={<ProductUpdate></ProductUpdate>}></Route>
          </Route>
          <Route path="/404" element={<NotFind></NotFind>}></Route>
          <Route path="*" element={<Navigate to="/404"></Navigate>}></Route>
        </Routes> */}
      </BrowserRouter>
    </ConfigProvider>
  )
}

export default App
